#ifndef CONSTRAINTDB_H_
#define CONSTRAINTDB_H_

#include "DataBase.h"
#include "ParameterDb.h"
#include "PointDb.h"
#include "../constraint/ConstraintHeaderSet.h"
//
namespace common {

class ConstraintDb: public common::DataBase<Constraint*> {
	PointDb* pointDb; // z tad pobieramy punkty
	ParameterDb* paramDb; // tu w razieczego dorzucamy parametry dla wiezow distance ,angle
public:
	ConstraintDb(PointDb* pointDb,ParameterDb* paramDb);

	void remove(int id) throw (MyException);

	ConnectPoints* addConnectPoints(int k,int l);
	FixPoint* addFixPoint(int k);
	Perpendicular* addPerpendicular(int k,int l, int m,int n);
	Horizontal* addHorizontal(int k,int l);
	Vertical* addVertical(int k,int l);
	Parallel* addParallel(int k,int l,int m,int n);
	SameLength* addSameLength(int k,int l,int m,int n);
	Distance* addDistanec(int k,int l,skreal paramValue);
	Angle* addAngle(int k,int l,int m,int n,skreal paramValue);
	Tangency* addTangency(int k,int l,int m,int n);

	virtual ~ConstraintDb();
};

}

#endif /* CONSTRAINTDB_H_ */
